`cutRS` <-
function(ruleSet, data, fun, rulesToCut){
	q = c() # quality of rules
	for(i in 1:length(ruleSet)){
		q[[as.character(i)]] = fun(ruleSet[[i]], data)
	}
	q = sort(q)
	print("deleted rule no:")
	for(i in 1:rulesToCut){
		print(as.character(attributes(q[i])))
		ruleSet[[as.character(attributes(q[i]))]]=NULL
	}
	print(fun)
	print(q)
	rs = list()
	for(i in 1:length(ruleSet)){
		rs[[as.character(i)]] = ruleSet[[i]]
	}
	return (rs)
}

